package com.teufandsub.socialproximity.logic;

import java.util.ArrayList;

/**
 * @author Bastien Mathias <bastienmathias@gmail.com>
 * @author Antoine Teuf <antoine.teuf@gmail.com>
 * @version 1.0
 * @since 2013-05-22
 * 
 * Class used to store message of a conversation
 * This class is a generic class to store message from a personal or an event conversation.
 */

public class Conversation {

	private ArrayList<Message> messages;
	
	public Conversation() {
		messages = new ArrayList<Message>();
	}
	
	public ArrayList<Message> getMessages(){
		return messages;
	}
	
	/**
	 * Method used to store a message.
	 * 
	 * @param author String author name of the message
	 * @param dest String name of the message's target
	 * @param content String content of the message.
	 */
	public void addMessage(String author,String dest, String content){
		messages.add(new Message(author,dest, content));
	}
	
	/**
	 * Method used to store a message
	 * 
	 * @param message Message you want to store.
	 */
	public void addMessage(Message message){
		messages.add(message);
	}
}
